package com.palfund.mvp.home.model;

import android.os.SystemClock;

import com.palfund.mvp.home.contract.LoginContract;

/**
 * Created by clvc on 2017/8/17.
 * 真正的速度是看不见的 !
 * Today is today , we will go !
 */

public class LoginModel implements LoginContract.Model {
    @Override
    public void login(final String name, final String password, final LoginListener listener) {
        new Thread() {
            @Override
            public void run() {
                SystemClock.sleep(5000);
                if ("name".equals(name) && "password".equals(password)) {
                    listener.successful();
                } else {
                    listener.failed();
                }
            }
        }.start();

    }
}
